{include file="header.html"}
<div id="main">
  {include file="menus.html"}
  <div id="rightCon" class="clearfix layui-body">
    <div class="scroller">
      <div class="explanation" id="explanation">
        <div class="title" id="checkZoom"> <i class="fa fa-lightbulb-o"></i>
          <h4>{$lang.operation_tip}</h4>
        </div>
        <ul>
          <li><i class="fa fa-angle-double-right"></i> 点击同意，店铺即可正常运营。</li>
          <li><i class="fa fa-angle-double-right"></i> 点击拒绝，须填写拒绝原因，拒绝后该店铺将允许申请者编辑后重新审核</li>
        </ul>
      </div>
      <div class="flexigrid">
        <form method="post">
          <table class="infoTable">
            <tr>
              <th class="paddingT15">{$lang.owner_real_name}</th>
              <td class="paddingT15 wordSpacing5">{$store.owner_name|escape}</td>
            </tr>
            <tr>
              <th class="paddingT15">{$lang.identity_card}</th>
              <td class="paddingT15 wordSpacing5">{$store.identity_card|escape}</td>
            </tr>
            <tr>
              <th class="paddingT15">{$lang.store_name}</th>
              <td class="paddingT15 wordSpacing5">{$store.store_name|escape}</td>
            </tr>
            <!--<tr>
        <th class="paddingT15">{$lang.scategory}</th>
        <td class="paddingT15 wordSpacing5" >{foreach from=$scates item=cate}{$cate.cate_name|escape}&nbsp;{/foreach}</td>
      </tr>-->
            <tr>
              <th class="paddingT15">{$lang.region}</th>
              <td class="paddingT15 wordSpacing5">{$store.region_name|escape}</td>
            </tr>
            <tr>
              <th class="paddingT15">{$lang.address}</th>
              <td class="paddingT15 wordSpacing5">{$store.address|escape}</td>
            </tr>
            <tr>
              <th class="paddingT15">{$lang.zipcode}</th>
              <td class="paddingT15 wordSpacing5">{$store.zipcode|escape}</td>
            </tr>
            <tr>
              <th class="paddingT15">{$lang.tel}</th>
              <td class="paddingT15 wordSpacing5">{$store.tel|escape}</td>
            </tr>
            <tr>
              <th class="paddingT15">{$lang.stype}</th>
              <td class="paddingT15 wordSpacing5">{$lang.{$store.stype}}</td>
            </tr>
            <tr>
              <th class="paddingT15">{$lang.sgrade}</th>
              <td class="paddingT15 wordSpacing5">{$store.sgrade}</td>
            </tr>
            <tr>
              <th class="paddingT15">{$lang.apply_remark}</th>
              <td class="paddingT15 wordSpacing5">{$store.apply_remark|escape|nl2br}</td>
            </tr>
            <tr>
              <th class="paddingT15">{$lang.uploaded_image}</th>
              <td class="paddingT15 wordSpacing5"> {if $store.identity_front}<a
                  href="{$store.identity_front|url_format}" target="_blank" class="mr20"><img
                    src="{$store.identity_front|url_format}" alt="{$lang.view}" height="30" /></a>{/if}
                {if $store.identity_back}<a href="{$store.identity_back|url_format}" target="_blank" class="mr20"><img
                    src="{$store.identity_back|url_format}" alt="{$lang.view}" height="30" /></a>{/if}
                {if $store.business_license}<a href="{$store.business_license|url_format}" target="_blank"
                  class="mr20"><img src="{$store.business_license|url_format}" alt="{$lang.view}"
                    height="30" /></a>{/if} </td>
            </tr>
            <!--{if $store.state neq 1}-->
            <tr>
              <th class="paddingT15">{$lang.reject_reason}</th>
              <td class="paddingT15 wordSpacing5"><textarea name="reason" cols="60" rows="4"
                  id="reject_reason"></textarea></td>
            </tr>
            <tr>
              <th></th>
              <td class="ptb20"><input type="hidden" id="action" name="action" value="agree" />
                <input class="layui-btn layui-bg-blue" type="submit" id="agree" value="{$lang.agree}" />
                <input class="layui-btn layui-btn-warm" type="button" id="reject" value="{$lang.reject}" />
              </td>
            </tr>
            <!--{/if}-->
          </table>
        </form>
      </div>
      {include file="version.html"}
    </div>
  </div>
</div>
<script type="text/javascript">
  $(function () {
    $("#reject").click(function () {
      var reason = $.trim($("#reject_reason").val());
      if (reason == '') {
        layer.msg(lang.input_reason);
        return false;
      }
      $('#action').val('reject');
      var type = $(this).parents('form').attr('method').toUpperCase();
      var url = window.location.href;
      var fromObj = $(this).parents('form');
      ajaxSubmit(type, url, fromObj);
      return false;
    });

    $("#agree").click(function () {
      $('#action').val('agree');
      $('#reject_reason').val('');
      var type = $(this).parents('form').attr('method').toUpperCase();
      var url = window.location.href;
      var fromObj = $(this).parents('form');
      ajaxSubmit(type, url, fromObj);
      return false;
    });
  });
</script>
{include file="footer.html"}